﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Simple.IRepository
/// <summary>
/// 版 本 钢易智企2.0 V 2.0.0 钢易智企2.0
/// Copyright (c) 2023 杭州钢易科技有限公司
/// 创建人：曾东明
/// 日 期：2024
/// 描 述：
/// </summary>
{
	public interface IWholeRepository<TEntity,Key>:IBaseRepository<TEntity,Key>
	{
		/// <summary>
		/// 
		/// </summary>
		/// <param name="entity"></param>
		/// <param name="CreatorId"></param>
		/// <returns></returns>
		public  Task<bool> CreateAsync(TEntity entity, long CreatorId);


		/// <summary>
		/// 
		/// </summary>
		/// <param name="entitys"></param>
		/// <param name="CreatorId"></param>
		/// <returns></returns>
		public  Task<bool> CreateAsync(List<TEntity> entitys, long CreatorId);

		/// <summary>
		/// 返回添加之后的实体
		/// </summary>
		/// <param name="entity"></param>
		/// <param name="CreatorId"></param>
		/// <returns></returns>

		public  Task<TEntity> CreateReturnEntityAsync(TEntity entity, long CreatorId);

		/// <summary>
		/// 
		/// </summary>
		/// <param name="lamada"></param>
		/// <param name="deleterId"></param>
		/// <returns></returns>

		public  Task<bool> SoftDelete(Expression<Func<TEntity, bool>> lamada, long deleterId);

		/// <summary>
		/// 
		/// </summary>
		/// <param name="entity"></param>
		/// <param name="updateId"></param>
		/// <returns></returns>
		public  Task<bool> UpdateAsync(TEntity entity, long updateId);

		/// <summary>
		/// 
		/// </summary>
		/// <param name="entitys"></param>
		/// <param name="updateId"></param>
		/// <returns></returns>
		public  Task<bool> UpdateAsync(List<TEntity> entitys, long updateId);
	
	}
}
